/*************************************************
Author: byron
Date: 08/08/2013
Description:
Notes: 
*************************************************/

#ifndef __CDaySignCfg_h__
#define __CDaySignCfg_h__

#include "commclass.h"
#include "CTArray.h"

class CDaySignCfg
{
public:
    CDaySignCfg() 
    {
        Clear();
    }

    void Clear()
    {
        _astContinueData.Clear();
        _astAccumulateData.Clear();
    }

    virtual ~CDaySignCfg() 
    {
    }

    int GetContinueDataSize() const {return _astContinueData.Size();}
    CKeyValue& GetContinueData(int iIndex){return _astContinueData[iIndex];}
    void AddContinueData(int iVal, unsigned int uiVal)
    {
        CKeyValue stKeyVal;
        stKeyVal._uiKey = uiVal;
        stKeyVal._iValue = iVal;
        _astContinueData.AddOneItem(stKeyVal);
    }

    int GetAccumulateDataSize() const {return _astAccumulateData.Size();}
    CKeyValue& GetAccumulateData(int iIndex){return _astAccumulateData[iIndex];}
    void AddAccumulateData(int iVal, unsigned int uiVal)
    {
        CKeyValue stKeyVal;
        stKeyVal._uiKey = uiVal;
        stKeyVal._iValue = iVal;
        _astAccumulateData.AddOneItem(stKeyVal);
    }

    int CheckDaySignCfg();

private:
    //连续签到奖励礼包数
    CTLib::CTArray<CKeyValue, MAX_DAY_SIGN_CONTINUE_COUNT> _astContinueData;

    //累计签到要求与奖励数
    CTLib::CTArray<CKeyValue, MAX_DAY_SIGN_ACCUMULATE_COUNT> _astAccumulateData;
};

#endif // __CDaySignCfg_h__

